OTRegisterName
Registers an entity name on the network.C INTERFACE
OSErr OTRegisterName (MapperRef ref, TRegisterRequest* request, TRegisterReply* reply);C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
ref
- A mapper reference.
request
- A pointer to a
TRegisterRequest
structure (page 4-11) that specifies the entity name you want to register and the endpoint address.reply
- A pointer to a
TRegisterReply
structure (page 4-12) that specifies the address and ID of the endpoint whose name is being registered.DESCRIPTION
If the name-registration protocol defined using theconfig
parameter to theOTOpenMapper
orOTAsyncOpenMapper
function supports dynamic name and address registration, you can use theOTRegisterName
function to make a name visible on the network to other network devices.Some protocol implementations under Open Transport allow a client to specify a name rather than an address when binding the endpoint using the
OTBind
function. Binding an endpoint by name causes the protocol to automatically register the name on the network if the protocol supports dynamic name registration. This is the simpler technique for registering a name and is preferred over creating a mapper provider and then using theOTRegisterName
function to register the name.The format for the requested name and address is specific to the protocol used. Please consult the documentation for the protocol you are using for format information.
COMPLETION EVENT CODES
T_REGNAMECOMPLETE
0x2000000 D
The OTRegisterName
function has completed. Thecookie
parameter of the notifier function points to thereply
parameter.SEE ALSO
You use theOTLookupName
function (page 4-25), to search for a registered name or to confirm that a name has been registered.You use the
OTDeleteName
function (described next) or theOTDeleteNameByID
function (page 4-24) to remove a previously registered name.You use the
OTOpenMapper
function (page 4-19) orOTAsyncOpenMapper
function (page 4-16) to create a mapper.The
OTBind
function is described in the chapter "Endpoints" in this book.For information on how to use this function with a TCP/IP protocol, see page 8-20 in the TCP/IP chapter.
Notifier functions are described in the chapter "Providers" in this book.